home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Otherware
/
Otherware_1_SB_Development.iso
/
mac
/
hypercar
/
xcmd
/
proglib.sit
/
Resource Library
/
card_4872.txt
< prev
next >
Wrap
Text File
|
1989-05-28
|
4KB
|
200 lines
-- card: 4872 from stack: in
-- bmap block id: 0
-- flags: 4000
-- background id: 6603
-- name: Paste
----- HyperTalk script -----
on idle
global runHilite
if runHilite and not (visible of msg) then
highlight A
end if
put not runHilite into runHilite
end idle
on InitPaste
put "" into card field File
put "" into card field Topaste
put "" into card field Name
end InitPaste
--- hidden fields on this card: File, HighlightAreas
on HideFields
set visible of card field "File" to false
set visible of card field "HighlightAreas" to false
end HideFields
on ShowFields
set visible of card field "File" to true
set visible of card field "HighlightAreas" to true
end ShowFields
-- part 1 (field)
-- low flags: 00
-- high flags: 0007
-- rect: left=88 top=109 right=194 bottom=288
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ToPaste
-- part 2 (field)
-- low flags: 00
-- high flags: 0004
-- rect: left=87 top=268 right=288 bottom=272
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Name
-- part 3 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=5 top=266 right=288 bottom=74
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Open╔
----- HyperTalk script -----
on mouseUp
if the optionKey is down then
put StandardFile("get") into theTarget
else
put StandardFile("get", "STAK", "XCMD", "APPL") into theTarget
end if
if theTarget is empty then
beep 1
answer "Request canceled." with "OK"
else
put theTarget into card field File
put StripPath(theTarget) into card field Name
end if
end mouseUp
-- part 4 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=141 top=204 right=256 bottom=221
-- title width / last selected line: 0
-- icon id / first selected line: 6724 / 6724
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Paste
----- HyperTalk script -----
on mouseUp
global External_Error, StackName
if card field "File" = "" then
answer "You must open a file first!" with "Oops"
exit mouseUp
end if
put number of lines in card field "ToPaste" into len
if len < 1 then
answer "Nothing to Paste!" with "Oops"
exit mouseUp
end if
repeat with ix = 1 to len
put line ix of card field "ToPaste" into tmp
if tmp = "" then next repeat
put word 1 of tmp into restype
if length of restype <> 4 then
put char 1 to (4 - length of restype) of " " after restype
end if
put tmp into resname
delete word 1 of resname
ResHandle "copy", StackName, card field "File", restype, resname
if External_Error <> "ok" then
answer "Paste failed" with "OK"
exit mouseUp
end if
end repeat
end mouseUp
-- part 5 (field)
-- low flags: 80
-- high flags: 0000
-- rect: left=4 top=24 right=44 bottom=471
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: File
-- part 6 (field)
-- low flags: 80
-- high flags: 0007
-- rect: left=88 top=231 right=316 bottom=288
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: HighlightAreas
-- part 8 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=4 top=138 right=160 bottom=74
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Clear
----- HyperTalk script -----
on mouseUp
put "" into card field "ToPaste"
end mouseUp
-- part contents for card part 6
----- text -----
11
475 26 504 59 opaq 1
475 60 504 93 opaq 2
424 163 505 185 roun 3
424 221 505 243 roun 4
424 192 505 214 roun 5
424 105 505 127 roun 6
471 300 502 331 opaq 7
424 134 505 156 roun 8
6 193 72 212 roun -1
142 132 219 181 roun -2
5 70 72 89 roun -3
-- part contents for background part 9
----- text -----
Paste Card